#pragma once
#include"RBtree.h"

namespace Set {

template<class K>
class set {
public:
	class KeyOfT {
	public:
		const K& operator()(const K& key) {
			return key;
		}
	};

protected:
	RBtree<K, K, KeyOfT> _tree;

public:
	typedef typename RBtree<K, K, KeyOfT>::const_iterator iterator;
	typedef typename RBtree<K, K, KeyOfT>::const_iterator const_iterator;

	const_iterator begin()const {
		return _tree.begin();
	}

	const_iterator end()const {
		return _tree.end();
	}

	pair<iterator, bool> Insert(const K& key) {
		pair<typename RBtree<K, K, KeyOfT>::iterator, bool> ret = _tree.Insert(key);
		return pair<iterator, bool>(ret.first, ret.second);
	}
};



}